package com.woniuxy.propertyjava.service.impl;

import com.woniuxy.propertyjava.dao.StaffimageDao;
import com.woniuxy.propertyjava.entity.Staffimage;
import com.woniuxy.propertyjava.service.StaffimageService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * Created by IntelliJ IDEA.
 *
 * @Author : author
 * @create 2022/7/9 10:06
 */
@Service
public class StaffimageServiceImpl implements StaffimageService {

    @Resource(type = StaffimageDao.class)
    StaffimageDao staffimageDao;


    @Override
    public Staffimage getStaffimageByProperty(int staffId) {
        Staffimage staffimage = staffimageDao.queryByStaffId(staffId);
        return staffimage;
    }

    @Override
    public void inserStaffimage(Staffimage staffimage) {
        staffimageDao.insert(staffimage);
    }

    @Override
    public void updateStaffimage(Staffimage staffimage) {
        staffimageDao.update(staffimage);
    }

    @Override
    public void deleteStaffimage(int imageid) {
        staffimageDao.deleteById(imageid);
    }
}
